from typing import Optional
from datetime import datetime
from pydantic import BaseModel

class CustomerPassengerBase(BaseModel):
    Name: str
    BirthdayDTS: datetime
    CertificateType: str
    CertificateNo: Optional[str] = None

class CustomerPassengerCreate(CustomerPassengerBase):
    customer_profile_id: int

class CustomerPassengerUpdate(CustomerPassengerBase):
    Name: Optional[str] = None
    BirthdayDTS: Optional[datetime] = None
    CertificateType: Optional[str] = None
    CertificateNo: Optional[str] = None

class CustomerPassenger(CustomerPassengerBase):
    ID: int
    customer_profile_id: int

    class Config:
        from_attributes = True 